Component({
  data: {
    selected: '',
    color: '#A2A2A2',
    selectedColor: '#000000',
    list: [{
      id: 1,
      selectedIconPath: '../static/images/menu1.png',
      iconPath: '../static/images/menu1.png',
      pagePath: '/pages/index/index',
      text: '首页'
    },
    {
      id: 2,
      selectedIconPath: '../static/images/images/menu2.png',
      iconPath: '../static/images/menu2.png',
      pagePath: '/pages/customer/customer',
      text: '客服'
    },
    ]
  },
  attached() { },
  methods: {
    openCustomerService() {
      wx.openCustomerServiceConversation({
        success: function(res) {
          console.log('客服会话打开成功', res);
        },
        fail: function(res) {
          console.log('客服会话打开失败', res);
        }
      });
    },
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({ url })
    },
  }
})